<template>
  <view class="interview-container">
    <view
      class="interview-item"
      @click="Nav(v.id)"
      v-for="(v, i) in examCateList"
      :key="v.id"
    >
      <image :src="v.cover" mode="widthFix"></image>
    </view>
    <view class="no-more" v-if="examCateList.length">
      <u-loadmore :status="status" font-size="24" :load-text="loadText" />
    </view>
    <ALoading v-show="aloading"></ALoading>
  </view>
</template>

<script>
import ALoading from "../../../components/loading/loading.vue"
export default {
  components: { ALoading },
  data() {
    return {
      examCateList: [],
      aloading: true,
      loadText: {
        nomore: "我也是有底线的",
      },
    }
  },

  onShow() {
    this.getExamCateList()
  },
  methods: {
    getExamCateList() {
      let data = {
        status: 1,
      }
      this.$store.dispatch("exam/cateList", data).then(res => {
        this.examCateList = res.data
        this.aloading = false
      })
    },
    Nav(id) {
      uni.navigateTo({
        url: "./detail/detail?id=" + id,
      })
    },
  },
}
</script>

<style lang="scss" scoped>
// 面试
.interview-container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  background-color: #fff;
  margin: 20upx 0;
  padding: 10upx;
  .interview-item {
    width: 48%;
    margin-bottom: 10upx;
    image {
      border-radius: 10upx;
    }
  }
}
</style>
